package com.honglang.module.article.service;

import java.util.List;

import com.honglang.module.article.dao.KeyWordDao;
import com.honglang.module.article.entity.KeyWord;

public class KeyWordServiceImpl implements KeyWordService{
	
	private KeyWordDao keyWordDao;
	
	
	/**
	 * save the keyWord
	 * @param keyWord
	 * @return
	 */
	public KeyWord save(KeyWord keyWord){
		
		return this.keyWordDao.merge(keyWord);
	}
	
	
	/**
	 * Get the keyWord Entity by name;
	 * @param keyWord
	 * @return
	 */
	public KeyWord getKeyWordByName(String keyWord){
		
		return this.keyWordDao.getKeyWordByName(keyWord);
	}
	
	
	
	/**
	 * get all the keyWord entities;
	 * @return
	 */
	public List<KeyWord> getAll(){
		return this.getKeyWordDao().getAll();
	}
	
	
	
	public KeyWordDao getKeyWordDao() {
		return keyWordDao;
	}

	public void setKeyWordDao(KeyWordDao keyWordDao) {
		this.keyWordDao = keyWordDao;
	}
	
	
	
}
